package spring.cloud.controller.resoure;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import spring.cloud.controller.feign.HelloFeignClient;

import javax.xml.ws.Response;

/**
 * Created with IntelliJ IDEA.
 * User: jiangfei
 * Date: 16-11-2
 * Time: 下午7:39
 * To change this template use File | Settings | File Templates.
 */
@RestController
public class HelloResouce {
    @Autowired
    HelloFeignClient helloFeignClient;

    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    public String sayHello(){
        return this.helloFeignClient.hello_say("www").getBody();
    }
}
